package cn.edu.scujcc;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/shopcar")
public class ShoppingCarController {
	@Autowired
	private ShoppingCarService service;
	
	@GetMapping
	public List<ShoppingCar> getAllShoplist(){
		List<ShoppingCar> result = null;
		result = service.getAllShoplist();
		return result;
	}
	
	public boolean delShoppingCar(@PathVariable String id) {
		boolean result =false;
		result = service.delShoppingCar(id);
		return result;
	}
}
